package org.crl.blogsystem.service;

import org.crl.blogsystem.entity.Blog;
import org.crl.blogsystem.entity.User;
import org.crl.blogsystem.entity.dto.BlogCreateDTO;
import org.crl.blogsystem.entity.dto.BlogDTO;
import org.crl.blogsystem.message.ResponseMessage;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Set;

public interface IBlogService{
    ResponseMessage<BlogDTO> createBlog(BlogCreateDTO blogCreateDTO, List<MultipartFile> images);

    void delete(Long id);

    List<Blog> getByUser(Long userId);

    List<Blog> getByUser();

    List<Blog> getByUserSet(Set<User> following);

    List<Blog> getHotBlogs(Integer limit);

    List<Blog> search(String key);

    Blog save(Blog blog);

    Blog getById(Long blogId);

    Blog update(Long id, Integer privateKey);
}
